const {isArr, isObj} = require('./type.js')

const isNone = (val)=>{
    if (isArr(val)) return !(val.length)
    if (isObj(val)) return !(Object.keys(val).length)
    return !val
}

const isArrNone = (val)=>{
    if (isArr(val)) return !(val.length)
}

const isObjNone = (val)=>{
    if (isObj(val)) return !(Object.keys(val).length)
}

module.exports = {
    isNone,isArrNone,isObjNone
}